module RoomDetailHelper
    def getRoomDetails userid
        connection = ActiveRecord::Base.connection
        
        #Prepare SQL String
        strSQL = "SELECT RoomName, OfficeName, PhoneNumber, RoomNumber as 'OfficeLocation', BridgeNumber as 'ConferenceBridge', BridgePin as 'Pin',InternalDial, NumSeats as 'Seats', RoomResources as 'Resources'"
        strSQL += " FROM VW_Room"
        strSQL += " WHERE RoomId=" + userid.to_s
        
        hash_set = connection.select_all strSQL
        @hash_set_details = ({"rows" => hash_set}).to_json
    end
  
end
